const Router = require('koa-router')
const { Comments } = require('../../models/comments')
const router = new Router({
  prefix: '/v1/comments',
})
router.get('/list', async (ctx, next) => {
  const { postid } = ctx.request.query
  const list = await Comments.getList(postid)
  ctx.body = {
    code: 200,
    data: list,
  }
})
module.exports = router

